<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="s" uri="/struts-tags" %>


<script type="text/javascript" src="js/jquery.itextclear.js"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $('input[type=text], input[type=password], input[type=url], input[type=email], input[type=number], textarea', '.form').iTextClear();
    });
</script>
<!-- jQplot CSS -->

<link rel="stylesheet" media="screen" href="${ctx}/css/Tree.css"/>
<link rel="stylesheet" media="screen" href="${ctx}/css/docs.css"/>
<!-- jQplot CSS END -->

<!-- DATATABLES CSS -->
<link rel="stylesheet" media="screen" href="lib/datatables/css/vpad.css"/>
<script type="text/javascript" src="lib/datatables/js/jquery.dataTables.js"></script>
<script type="text/javascript">
    /*$(document).ready(function() {
     $('#example').dataTable({
     "sPaginationType": "full_numbers"
     });
     });*/
</script>
<!-- DATATABLES CSS END -->

<script>
    $(document).ready(function () {
        $('#simple-button').popover('#simple-popover', {});
        $('#top-button').popover('#top-popover', {preventLeft:true, preventRight:true, preventBottom:true});
    });
</script>

<style>
    .current_organization_ul li {
        height: 22px;
        line-height: 22px
    }

    span.title {
        font-weight: 600;
        padding-right: 15px;
    }
</style>

<h1 class="page-title">员工离职审核</h1>


<div class="container_12 clearfix leading">
<section class="tabs grid_12 leading">
<ul class="clearfix">
    <li><a href="#" class="current">员工基础资料</a></li>
    <li><a href="#">教育情况</a></li>
    <li><a href="#">培训情况</a></li>
    <li><a href="#">工作经历</a></li>
    <li><a href="#">家庭情况</a></li>
</ul>
<section>

<DIV class="portlet grid_6">
    <header>
        <h5_n>${transaction.work.baseId.name}</h5_n>
        <h2>${transaction.work.baseId.sex == "0" ? "先生" : "女士"}</h2>
    </header>
    <section class="clearfix">
        <div class="grid_5 alpha" style=" text-align:center">
            <img src="images/list_JS.jpg" width="120" height="135" id="photo_old"/>
        </div>
        <div class="grid_3">
            <dl>
                <dt>岗位</dt>
                <dd><h6>${transaction.oldDuty.dutyName}</h6></dd>
                <dt>员工号</dt>
                <dd><h6>${transaction.work.workNo}</h6></dd>
                <dt>职等</dt>
                <dd><h6>${transaction.oldGradeLevel.gradeName}</h6></dd>
            </dl>
        </div>
        <div class="grid_3">
            <dl>
                <dt>部门</dt>
                <dd><h6>${transaction.oldOrganization.fullName}</h6></dd>
                <dt>职务</dt>
                <dd><h6>${transaction.oldDuty.dutyName} </h6></dd>
                <dt>职级</dt>
                <dd><h6>${transaction.oldGradeLevel.gradeSort}</h6></dd>
            </dl>
        </div>
    </section>
</DIV>

<DIV class="portlet grid_6">
    <header>
        <h5_n>${transaction.work.baseId.name}</h5_n>
        <h2>${transaction.work.baseId.sex == "0" ? "先生" : "女士"}</h2>
    </header>
    <section class="clearfix">
        <div class="grid_5 alpha" style=" text-align:center">
            <img src="images/list_JS.jpg" width="120" height="135" id="photo_new"/>
        </div>
        <div class="grid_3">
            <dl>
                <dt>岗位</dt>
                <dd><h6>${transaction.newDuty.dutyName}</h6></dd>
                <dt>员工号</dt>
                <dd><h6>${transaction.work.workNo}</h6></dd>
                <dt>职等</dt>
                <dd><h6>${transaction.newGradeLevel.gradeName}</h6></dd>
            </dl>
        </div>
        <div class="grid_3">
            <dl>
                <dt>部门</dt>
                <dd><h6 style="color:#F00">${transaction.newOrganization.fullName}</h6></dd>
                <dt>职务</dt>
                <dd><h6 style="color:#F00">${transaction.newDuty.dutyName} </h6></dd>
                <dt>职级</dt>
                <dd><h6 style="color:#F00">${transaction.newGradeLevel.gradeSort}</h6></dd>
            </dl>
        </div>
    </section>
</DIV>

<section class="clearfix" style="display: block;">
    <Div class="grid_3 leading">
        <dl>
            <dt>出生年月</dt>
            <dd><s:date name="#request.transaction.work.baseId.birthday" format="yyyy-MM-dd"/></dd>
            <dt>身高</dt>
            <dd>${transaction.work.baseId.stature}</dd>
            <dt>体重</dt>
            <dd>${transaction.work.baseId.avoirdupois}</dd>
            <dt>邮箱</dt>
            <dd>${transaction.work.baseId.email}</dd>
            <dt>英语阅读</dt>
            <dd id="english_read"></dd>
            <dt>英语书写</dt>
            <dd id="english_write"></dd>
            <dt>英语会话</dt>
            <dd id="english_speak"></dd>
        </dl>
    </Div>

    <Div class="grid_3 leading">
        <dl>
            <dt>户籍地址</dt>
            <dd>${transaction.work.baseId.census}</dd>
            <dt>档案所在地</dt>
            <dd>${transaction.work.baseId.archives}</dd>
            <dt>联系地址</dt>
            <dd>${transaction.work.baseId.address}</dd>
            <dt>手机</dt>
            <dd>${transaction.work.baseId.handSet}</dd>
            <dt>其他语言阅读</dt>
            <dd id="other_language_read"></dd>
            <dt>其他语言书写</dt>
            <dd id="other_language_write"></dd>
            <dt>其他语言会话</dt>
            <dd id="other_language_speak"></dd>
        </dl>
    </Div>

    <Div class="grid_3 leading">
        <dl>
            <dt>身份证</dt>
            <dd>${transaction.work.baseId.idcard}</dd>
            <dt>左眼视力</dt>
            <dd>${transaction.work.baseId.eyeLeft}</dd>
            <dt>电话</dt>
            <dd>${transaction.work.baseId.tel}</dd>
            <dt>婚否</dt>
            <dd>${transaction.work.baseId.marry == "0" ? "未婚" : "已婚"}</dd>
            <dt>英语证书</dt>
            <dd id="english_certification"></dd>
            <dt>子女</dt>
            <dd>${transaction.work.baseId.baby == "0" ? "无" : "有"}</dd>
            <dt>员工状态</dt>
            <dd id="status_employee"></dd>
        </dl>
    </Div>

    <Div class="grid_3 leading">
        <dl>
            <dt>名族</dt>
            <dd>${transaction.work.baseId.folk}</dd>
            <dt>右眼视力</dt>
            <dd>${transaction.work.baseId.eyeRight}</dd>
            <dt>住所邮编</dt>
            <dd>${transaction.work.baseId.postcode}</dd>
            <dt>薪资</dt>
            <dd>${transaction.work.gradeLevel.gradePay}</dd>
            <dt>学历</dt>
            <dd id="certificate_employee"></dd>
            <dt>其他说明事项</dt>
            <dd>${transaction.work.baseId.remark}</dd>
        </dl>
    </Div>


</section>
<section class="clearfix" style="display: none;">
    <header class="grid_12 alpha omega">
    </header>
    <Div class="grid_12 leading">
        <div class="message success ">
            <h3>教育经历</h3>
            <%--<p> 上海复旦大学 , 本科 , 计算机学编程方向</p>
            <p> 2001年09月-2005年07月 (3年10月)</p>--%>
            <s:if test="#request.educations != null and #request.educations.size() > 0">
                <s:iterator value="#request.educations" var="edu">
                    <p> ${edu.schoolName} , ${edu.degree} , ${edu.specialty}</p>
                    <p> <s:date name="#request.edu.beginDate" format="yyyy年MM月"/>-<s:date name="#request.edu.endDate" format="yyyy年MM月"/> (${edu.diffMon})</p>
                </s:iterator>
            </s:if>
        </div>
    </Div>
</section>
<section class="clearfix" style="display: none;">
    <Div class="grid_12 leading">
        <div class="message info">
            <h3>培训经历</h3>
            <%--<p> 大学英语六级 , 复旦大学 , 大学英语六级考试</p>
            <p>2001年09月-2005年07月 (3年10月)</p>--%>
            <s:if test="#request.trains != null and #request.trains.size() > 0">
                <s:iterator value="#request.trains" var="tra">
                    <p> ${tra.letter} , ${tra.trainAddress} , ${tra.trainContent}</p>
                    <p> <s:date name="#request.tra.beginDate" format="yyyy年MM月"/>-<s:date name="#request.tra.endDate" format="yyyy年MM月"/> (${tra.diffMon})</p>
                </s:iterator>
            </s:if>
        </div>
    </Div>
</section>
<section class="clearfix" style="display: none;">
    <Div class="grid_12 leading">
        <div class="message warning">
            <h3>工作经历</h3>
            <%--<p> 系统架构师</p>
            <p>三星电子上海有限公司</p>
            <p>2001年09月-2005年07月 (3年10月)</p>
            <p>月薪:6000元</p>
            <p>证明人: 张大海</p>
            <p>联系电话: 525544885</p>
            <p>离职原因: 路途遥远</p>--%>
            <s:if test="#request.workExperiences != null and #request.workExperiences.size() > 0">
                <s:iterator value="#request.workExperiences" var="exp">
                    <p> ${exp.job}</p>
                    <p> ${exp.compname}</p>
                    <p> <s:date name="#request.exp.beginDate" format="yyyy年MM月"/>-<s:date name="#request.exp.endDate" format="yyyy年MM月"/> (${exp.diffMon})</p>
                    <p>月薪:${exp.monthlyPay}</p>
                    <p>证明人: ${exp.proveMan}</p>
                    <p>联系电话: ${exp.contel}</p>
                    <p>离职原因: ${exp.resignReason}</p>
                    <br/>
                </s:iterator>
            </s:if>
        </div>
    </Div>
</section>
<section class="clearfix" style="display: none;">
    <s:if test="#request.families != null and #request.families.size() > 0">
    <s:iterator value="#request.families" var="fam">
    <Div class="grid_3 leading">
        <dl>
            <dt>家庭关系</dt>
            <dd>${fam.familyRelation}</dd>
            <dt>紧急联系人</dt>
            <dd>${fam.exigenceConname}</dd>
        </dl>
    </Div>

    <Div class="grid_3 leading">
        <dl>
            <dt>工作单位</dt>
            <dd>${fam.compname}</dd>
            <dt>紧系联系人关系</dt>
            <dd>${fam.exigenceRelation}</dd>
        </dl>
    </Div>

    <Div class="grid_3 leading">
        <dl>
            <dt>姓名</dt>
            <dd>${fam.name}</dd>
            <dt>紧急联系人电话</dt>
            <dd>${fam.contel}</dd>
        </dl>
    </Div>

    <Div class="grid_3 leading">
        <dl>
            <dt>住宅地址</dt>
            <dd>${fam.address}</dd>
        </dl>
    </Div>
    <br/>
    </s:iterator>
    </s:if>
</section>
</section>
</section>


<div class="tabs side grid_12 leading">

    <div class="clear"></div>
    <div class="grid_12"></div>


</div>
</div>

<script type="text/javascript">
    $(function () {
        $("#left_level").next("section").css("width", 250);
        var photo = "${transaction.work.baseId.facePath}";
        if(photo == "" || photo == "null"){
            $("#photo_old").attr("src", "${ctx}/images/Avatar.jpg")
            $("#photo_new").attr("src", "${ctx}/images/Avatar.jpg")
        }else{
            $("#photo_old").attr("src", "${ctx}${transaction.work.baseId.facePath}")
            $("#photo_new").attr("src", "${ctx}${transaction.work.baseId.facePath}")
        }
        $("#english_read").html(nengLi("${transaction.work.baseId.englishRead}"));
        $("#english_write").html(nengLi("${transaction.work.baseId.englishWrite}"));
        $("#english_speak").html(nengLi("${transaction.work.baseId.englishDialog}"));
        $("#other_language_read").html(nengLi("${transaction.work.baseId.languageRead}"));
        $("#other_language_write").html(nengLi("${transaction.work.baseId.languageWrite}"));
        $("#other_language_speak").html(nengLi("${transaction.work.baseId.languageDialog}"));

        //英语证书
        $("#english_certification").html(zhengShu("${transaction.work.baseId.englishLetter}"));

    });

    function nengLi(value){
        if(value == "1"){ return "一般" }
        else if(value == "2"){ return "熟练"; }
        else if(value == "3"){return "精通" }
    }
    function zhengShu(value){
        if(value == "3")return "三级";
        else if(value == "4"){return "四级";}
        else if(value == "6"){return "六级";}
        else if(value == "8"){return "八级";}
        else{ return "";}
    }
</script>

<%@ include file="/WEB-INF/pages/common/common_audit.jsp" %>